package cn.tansanqinger.dao.sql.topic;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import cn.tansanqinger.dao.sql.ICommentTopicSqlDao;
import cn.tansanqinger.pojo.Commenttopic;

@Repository
public class CommentTopicSqlDaoImpl {

	@Autowired
	private ICommentTopicSqlDao dao;
	
	/**
	 * 查询全部评论
	 * @param uid
	 * @return
	 */
	public List<Commenttopic> selectCommentTopic(int uid){
		QueryWrapper<Commenttopic> queryWrapper = new QueryWrapper<Commenttopic>();
		queryWrapper.lambda().eq(Commenttopic::getUid, uid);
		return dao.selectList(queryWrapper);
	}
}
